<template>
  <div class="com-rang-type">
    <div>{{ title }}</div>
    <div
      class="rang"
      :style="{ background: `linear-gradient(86deg, ${colors[0]}, ${colors[1]})` }"
    >{{ rang }} / {{ total }}</div>
  </div>
</template>

<script>
export default {
  props: {
    colors: {
      type: Array,
      required: true
    },
    title: {
      type: String,
      required: true
    },
    rang: {
      type: [Number, String],
      default: '-'
    },
    total: {
      type: [Number, String],
      default: '-'
    }
  }
};
</script>

<style lang="scss" scoped>
.com-rang-type {
  width: 160px;
  font-size: 20px;
  .rang {
    height: 40px;
    line-height: 40px;
    text-align: center;
    color: #fff;
    margin: 8px 0 14px;
  }
}
</style>
